package cn.kgc.tangcco.tcbd1011.no13.vehicle.service.impl;

import java.util.List;

import cn.kgc.tangcco.tcbd1011.no13.base.properties.factory.PropertiesFactory;
import cn.kgc.tangcco.tcbd1011.no13.base.util.Utils;
import cn.kgc.tangcco.tcbd1011.no13.vehicle.dao.VehicleDao;
import cn.kgc.tangcco.tcbd1011.no13.vehicle.entity.Vehicle;
import cn.kgc.tangcco.tcbd1011.no13.vehicle.service.VehicleService;
import cn.kgc.tangcco.tcbd1011.no13.vehicle.vo.VehicleVo;

public class VehicleServiceImpl implements VehicleService {
	private VehicleDao vehicleDao;
	public VehicleServiceImpl() {
		vehicleDao = (VehicleDao) PropertiesFactory.getInstance(Utils.VEHICLEDAO);
	}
	@Override
	public List<VehicleVo> queryAllVehicle(VehicleVo vehicle) {
		return this.vehicleDao.queryAllVehicle(vehicle);
	}

	@Override
	public VehicleVo detailVehicle(int pk) {
		return this.vehicleDao.detailVehicle(pk);
	}

	@Override
	public int queryCountVehicle() {
		return this.vehicleDao.queryCountVehicle();
	}

	@Override
	public int addVehicle(Vehicle vehicle) {
		return this.vehicleDao.addVehicle(vehicle);
	}

	@Override
	public int updateVehicle(Vehicle vehicle) {
		return this.vehicleDao.updateVehicle(vehicle);
	}

	@Override
	public int deleteVehicle(int pk) {
		return this.vehicleDao.deleteVehicle(pk);
	}

}
